from django.conf.urls import patterns, include, url
from views import login_action,regiest_action,home_action,logout_action,submit_words_action,change_password_action,test_action,road_action
from news.views import news_action,news_single_action
from problem.views import problem_action,problem_new_action,add_problem_action,single_problem_action
from catchnews.views import catch_news_action
from tutsau.views import add_tutsau_action,single_tutsau_action,tutsau_new_action,tutsau_action
from relax.views import add_relax_action,relax_action,single_relax_action,relax_new_action,join
from userinfo.views import activity_action,edit_user_action,userinfo_submit_action,userinfo_action,forget_passwd_action,getpasswd_action
from ifoundyou.views import getcoordinate_action,ifoundyou_action,ifoundyou_by_phone,ifoundyou_by_time
from message.views import message_action,delete_message_action,new_message_action,single_message_action
from django.contrib.auth.views import logout
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    (r'^css/(?P<path>.*)$','django.views.static.serve',{'document_root':'Graduation_web\\static\\css' }),
    (r'^img/(?P<path>.*)$','django.views.static.serve',{'document_root':'Graduation_web\\static\\img' }),
    (r'^js/(?P<path>.*)$','django.views.static.serve',{'document_root':'Graduation_web\\static\\js' }),
    (r'^admin',include(admin.site.urls)),
    (r'^news/(\d{1,3}$)',news_single_action),
    (r'^news$',news_action),
    (r'^problem$',problem_action),
    (r'^newproblem$',problem_new_action),
    (r'^add_problem$',add_problem_action),
    (r'^singleproblem$',single_problem_action),
    (r'^tutsau$',tutsau_action),
    (r'^newtutsau$',tutsau_new_action),
    (r'^add_tutsau$',add_tutsau_action),
    (r'^singletutsau$',single_tutsau_action),
    (r'^relax$',relax_action),
    (r'^newrelax$',relax_new_action),
    (r'^add_relax$',add_relax_action),
    (r'^singlerelax$',single_relax_action),
    (r'^join$',join),
    (r'^submitwords$',submit_words_action),
    (r'^regiest$',regiest_action),
    (r'^login$',login_action),
    (r'^logout$',logout),
    (r'^catchnews$',catch_news_action),
    (r'^userinfo$',userinfo_action),
    (r'^forgetpasswd$',forget_passwd_action),
    (r'^getpasswd$',getpasswd_action),
    (r'^submit_user$',userinfo_submit_action),
    (r'^activity$',activity_action),
    (r'^edit$',edit_user_action),
    (r'^change_passwd$',change_password_action),
    (r'^message$',message_action),
    (r'^message/(\d{1,3})$',single_message_action),
    (r'^del_message/(\d{1,3})$',delete_message_action),
    (r'^new_message/(\w*)$',new_message_action),
    (r'^getcoordinate$',getcoordinate_action),
    (r'^ifoundyou$',ifoundyou_action),
    (r'^ifoundyoubyphone$',ifoundyou_by_phone),
    (r'^ifoundyoubytime$',ifoundyou_by_time),
    (r'^test$',test_action),
    (r'^road$',road_action),
    (r'[/s/S]*',home_action),
    
    # Examples:
    # url(r'^$', 'WEB_SERVER.views.home', name='home'),
    # url(r'^WEB_SERVER/', include('WEB_SERVER.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    # url(r'^admin/', include(admin.site.urls)),
)
